<?php
namespace app\api\controller;

class Role extends Base
{
	public function index()
	{
		$page = request_input('page',1);
		$pageSize = request_input('pageSize',20);
		$param['keyword'] = request_input('keyword');
		$param['cate'] = request_input('cate',0);
		$self = request_input('self',0);
		if($self > 0){
			$param['staff_id'] = $this->staff->id;
		}
		$data = $this->union->news()->Nwhere($param)->paginate($pageSize)->append(['staff'=>['name']]);
		return cdm(200, $data, '');
	}

	public function create()
	{
		
	}

	public function save()
	{
		
	}

	public function read($id)
	{

	}

	public function edit($id)
	{
		
	}

	public function update($id)
	{
		
	}

	public function delete($id)
	{
		
	}
}